package cn.wolfcode.trip.base.util;

/**
 * Copyright: Copyright (c) 2019 Super520
 * 描述：
 *
 * @package: cn.wolfcode.trip.base.util
 * @author: Patch
 * @date: 2019/5/27 17:09
 * 总结:
 */

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**

 * swagger的配置对象

 */

@Configuration

@EnableSwagger2

public class SwaggerConfig {

    /**
     * 把一个Docker交给spring管理
     * Docket：springfox提供的文档的配置对象；
     * @return
     */
    @Bean
    public Docket api() {
        return new Docket(DocumentationType.SWAGGER_2).select().build();
    }

}